import request from '@/utils/request'
// 获取商品同类推荐-未传入ID为猜喜欢
export const findRelGoods = (id,limit=16) => {
  return request ({
    url: '/goods/relevant',
    method: 'get',
    params:{
      id,
      limit
    }
  })
}

// 获取热榜商品
export const findHotGoods = ({id, type, limit=3 }) => {
  return request({
    url: '/goods/hot',
    method: 'get',
    params: { id, type, limit }
  })
}
// 获取商品的评价统计信息

export const findCommentInfoByGoods = (id) => {
  return request({
    url:`/goods/${id}/evaluate`,
    method: 'get'
  })
}

// 评价分页数据
export const findCommentListByGoods = (id,params) => {
  return request({
    url:`/goods/${id}/evaluate/page`,
    method: 'get',
    params
  })
}